import request from '@/utils/request'

/**
 * 获取文章列表
 */
export function getComments (params) {
  return request({
    method: 'GET',
    url: '/app/v1_0/comments',
    params
  })
}
// 给评论点赞
export function addCommentLike (likeId) {
  return request({
    method: 'POST',
    url: '/app/v1_0/comment/likings',
    data: {
      target: likeId
    }
  })
}
// 取消评论点赞
export function deleteCommentLike (likeId) {
  return request({
    method: 'DELETE',
    url: `/app/v1_0/comment/likings/${likeId}`
  })
}
// 发布评论data
export function addComment (data) {
  return request({
    method: 'POST',
    url: '/app/v1_0/comments',
    data
  })
}
